package net.jeeshop.core;

import java.io.FileWriter;
import java.io.IOException;

public class AlipayConfig {
		
	//↓↓↓↓↓↓↓↓↓↓请在这里配置您的基本信息↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓

		// 应用ID,您的APPID，收款账号既是您的APPID对应支付宝账号
		public static String app_id = "2016091500517314";
		
		// 商户私钥，您的PKCS8格式RSA2私钥
	    public static String merchant_private_key = "MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCOX51diMkgAZSohYczfdlTOr1hbyBaGKi67vq1We1Glp72SQfBhzYUt45mreMFatOdS4xEzPTZeysuIGrWM/9OktMhkTCA+Pk0xV7zTvDUpKS/M9eoTeL3kZPzRbyrK5i+PGKzgT9rsqA1F/9fhItM/IFEmKflKgrUmyA1+ymJbyeFEEZKMkIliKVXgdAsdkHfJl+XCqgBOcmX94E8oijtqXYnMgWKoRQ0hCH+nge5BgyDw/vRBMA/idTG8RfQynWcfv42XrckLgcgi/D+6OX7n/Vgb6Ky/StjOUXuZh+Mn2RKDQQq71oBG6kaiXAq8dMsPG9bWQ1xCku67lxkZd9NAgMBAAECggEADgZtQiGPbo+5TUCaKQBkwEYxEcAYt8dmF8Qi/mp1bVa5IhnfobjoIvJSHNtUWdxELGKc1so59JKllk2rOJ62r87W7Z+X35ynMAOhbuZ/4vK1KAC7ZeEGUs0MfhKIm3QX/+WC85vv23QlRBWxGn+8GUFmmpNPNswFdRwy+B5d4SPkaQ0dA9QiqJTIFMMMxElUdPuva6mAdWSwkO2UI4z8pIZDPu4SfbrSzF5F4K4a2K+vAM/wsASPDh+5vOw8tgMnFQZy7gOxrqjVnUpXgzCBB2y7wuODlsVCgOJkrKfISIkpQlfu3UZ3wZQSRd/CQHzMx+iAC1qlW4BPQXUJibIxAQKBgQDDWbpgS5F4bPYhsfRvMhKgZGEchDPgshODpP3RGZ3Ldyz4ksr42t7VTioUKlelD2O0DtbY3JQAtkGnrL+0xIhOp26GuU4EN/WJnBvPYMSm86P8JBj3HZ4L9mbA9WIXrFndhLvW+mGYfRda80kuHgOi21qBJTEs0JoZaiqWYdHG2QKBgQC6k1MevY0uGBQ7k1iosnRqCD83/yJuh7p/dhACkgA7xvIwmwMRS04e5GfsPrRSiDmsgGNm166kyHU6Pc1lfxlYb+2S6Pne7HAm/U1dCVzcscm5zkpb3p3h9QjckHjkBGC8j1d5HfF7aEQ7XCWbLkbNePXq4u+zVkzgFZc+Sc5blQKBgQCENj84mwx6Z6xxg6I+e7I1kZpUFXmS8pLYfxs1oNO1+BOcrKTopiE4Vm2ONlYZJYBCReTM4wTcMn3fAMDClFz4dsMMNXAC1Oi+WMRNp12Q7MaoiLnIzefAiuRiZfEcuo4bqZED33OcI9VhvdRifPfTCgiH7WcJwKj62Gq4Wr4CiQKBgDG7ZXOTORepSXNb4k0NTGSbECbf9hCaU0b4dGoK+s70R8hW+WlZtlgbr+vUBwLc1uq5SkW2hhHccQr2QFKmn13ob94yBbC7O2XZLQ74mO0m4suJRl7YpyL8ysDoLaEx3YtFdh6NsbmgYFemR0vm+O56KKrUlOorvdAZUThEOiJFAoGAR2ihxnRHOyjp662n69/IKDbLxMd0JI1yl5jqC9xqTBkeYX8jYooAq8+OfaKdhfE9w/Sa9nNHpMrgilLAbyQ9ZRsUARFbph3mfsTZbpkqlAwce32oWTwdj7BafsHV5jN57RuZz3XTjmkFVd6ZaC9g4uaEZzqBOWzY4vY8HfWOXW4=";
		
		// 支付宝公钥,查看地址：https://openhome.alipay.com/platform/keyManage.htm 对应APPID下的支付宝公钥。
	    public static String alipay_public_key = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAjl+dXYjJIAGUqIWHM33ZUzq9YW8gWhiouu76tVntRpae9kkHwYc2FLeOZq3jBWrTnUuMRMz02XsrLiBq1jP/TpLTIZEwgPj5NMVe807w1KSkvzPXqE3i95GT80W8qyuYvjxis4E/a7KgNRf/X4SLTPyBRJin5SoK1JsgNfspiW8nhRBGSjJCJYilV4HQLHZB3yZflwqoATnJl/eBPKIo7al2JzIFiqEUNIQh/p4HuQYMg8P70QTAP4nUxvEX0Mp1nH7+Nl63JC4HIIvw/ujl+5/1YG+isv0rYzlF7mYfjJ9kSg0EKu9aARupGolwKvHTLDxvW1kNcQpLuu5cZGXfTQIDAQAB";

		// 服务器异步通知页面路径  需http://格式的完整路径，不能加?id=123这类自定义参数，必须外网可以正常访问
		public static String notify_url = "http://www.xihu.design/tradegate/notify_url.jsp";

		// 页面跳转同步通知页面路径 需http://格式的完整路径，不能加?id=123这类自定义参数，必须外网可以正常访问
		public static String return_url = "http://www.xihua.design/tradegate/return_url.jsp";

		// 签名方式
		public static String sign_type = "RSA2";
		
		// 字符编码格式
		public static String charset = "utf-8";
		
		// 支付宝网关
		public static String gatewayUrl = "https://openapi.alipaydev.com/gateway.do";
		
		// 支付宝网关
		public static String log_path = "/usr/local/apache-tomcat-9.0.8/logs/";


	//↑↑↑↑↑↑↑↑↑↑请在这里配置您的基本信息↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑

	    /** 
	     * 写日志，方便测试（看网站需求，也可以改成把记录存入数据库）
	     * @param sWord 要写入日志里的文本内容
	     */
	    public static void logResult(String sWord) {
	        FileWriter writer = null;
	        try {
	            writer = new FileWriter(log_path + "alipay_log_" + System.currentTimeMillis()+".txt");
	            writer.write(sWord);
	        } catch (Exception e) {
	            e.printStackTrace();
	        } finally {
	            if (writer != null) {
	                try {
	                    writer.close();
	                } catch (IOException e) {
	                    e.printStackTrace();
	                }
	            }
	        }
	    }
	


}
